package com.cnplan.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.cnplan.entity.GisCenterlineEntity;
import com.cnplan.entity.GisKxsjEntity;
import com.cnplan.entity.GisQjsgcEntity;
import com.cnplan.mapper.GisKxsjMapper;
import com.cnplan.service.GisService;
import com.cnplan.vo.QjsgcVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class GisController {
    @Autowired
    private GisService gisService;

    @RequestMapping("/getGis")
    public Object getGis(String x, String y,String name){
        Object gis = gisService.getGis(x, y, name);
        return gis;
    }

    @RequestMapping("/getQjsgc")
    public Object getQjsgc(String gcxkz){
        List<QjsgcVo> qjsgc = gisService.getQjsgc(gcxkz);
        return qjsgc;
    }

    @RequestMapping("/getQjsgcById")
    public Object getQjsgcById(int id){
        GisQjsgcEntity qjsgcById = gisService.getQjsgcById(id);
        return qjsgcById;
    }


}
